﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;


using TrivialPurfuit.Business;

namespace TrivialPurfuit.Presentation.AskForCatagory
{
    /// <summary>
    /// Interaction logic for GetCatagory.xaml
    /// </summary>
    public partial class GetCategory : Window
    {
        private QuestionCategory categoryChoice;

        private GetCategory()
        {
            InitializeComponent();
        }

        private void setMessage(string message)
        {
            this.messageBlock.Text = message;
        }

        private QuestionCategory getCategoryChoice()
        {
            return this.categoryChoice;
        }

        public static QuestionCategory askForCategoryFromName(string name)
        {
            GetCategory temp = new GetCategory();

            temp.setMessage(name + ", please choose the category.");
            temp.ShowDialog();

            return temp.getCategoryChoice();
        }

        private void Button1_Click(object sender, RoutedEventArgs e)
        {
            this.categoryChoice = GameBoard.Instance.Category1;
            this.Close();
        }

        private void Button2_Click(object sender, RoutedEventArgs e)
        {
            this.categoryChoice = GameBoard.Instance.Category2;
            this.Close();
        }

        private void Button3_Click(object sender, RoutedEventArgs e)
        {
            this.categoryChoice = GameBoard.Instance.Category3;
            this.Close();
        }

        private void Button4_Click(object sender, RoutedEventArgs e)
        {
            this.categoryChoice = GameBoard.Instance.Category4;
            this.Close();
        }


    }
}
